﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Transactions;
using NUnit.Framework;

namespace TeamsPortal.Tests.DataAccess
{
    public class BaseRollbackTest
    {
        private TransactionScope _scope;

        [SetUp]
        public void Init()
        {
            _scope = new TransactionScope();
            DoInit();
        }

        [TearDown]
        public void Cleanup()
        {
            DoCleanup();
            _scope.Dispose();
        }

        protected virtual void DoInit()
        {

        }

        protected virtual void DoCleanup()
        {
            
        }
    }
}
